package com.smartwebx.fr.dao;

import org.springframework.context.support.ApplicationObjectSupport;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import com.smartwebx.fr.util.StationFinalFields.DataSources;

/**
 * 获得 jdbcTempalte
 * @author Administrator
 *
 */
@Repository
public class GetJdbcTempalte extends ApplicationObjectSupport {
	
	/**
	 * 根据jdbc名称获得 jdbcTempalte
	 * @param jdbcName
	 * @return
	 */
	public JdbcTemplate getJdbcTemplate(DataSources jdbcName) {
		return (JdbcTemplate) this.getApplicationContext().getBean(jdbcName.toString());
	}
}